<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>练习</title>
</head>
<body>
    <script>
        //1.模运算   百分号%
        let num = 22;
        console.log(num % 5);//余数
        //2. 精度失真 先转化为二进制
        console.log(7*100); //700
        console.log(0.1 + 0.2);//输出为 0.30000000000000004  
        console.log(0.07 * 100);//7.000000000000001
        // 3. 精度失真 会给货币计算带来很大的问题
        //Java--bigdecimal     mysql--decimal  (前端负责数据渲染)
        //溢出 有效位17   解决 转为字符串
        //小数
        let num1 = 3.1415926;
        console.log(num1.toFixed(2));

    </script>
</body>
</html>